package com.kika.obwiki.service.impl;

import com.kika.obwiki.entity.EbookSnapshot;
import com.kika.obwiki.mapper.EbookSnapshotMapper;
import com.kika.obwiki.service.IEbookSnapshotService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.kika.obwiki.resp.StatisticResp;
import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author cr
 * @since 2025-06-22
 */
@Service
public class EbookSnapshotServiceImpl extends ServiceImpl<EbookSnapshotMapper, EbookSnapshot>
    implements IEbookSnapshotService {

  /**
   * 生成今日电子书快照
   */
  @Override
  public void genSnapshot() {
    this.baseMapper.genSnapshot();
  }

  /**
   * 查询统计数据
   * 
   * @return 统计数据列表
   */
  @Override
  public List<StatisticResp> getStatistic() {
    return this.baseMapper.getStatistic();
  }

  /**
   * 查询近30天快照统计数据
   * 
   * @return 30天快照统计数据列表
   */
  @Override
  public List<StatisticResp> get30Statistic() {
    return this.baseMapper.get30Statistic();
  }

}
